<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style>
			* {margin: 0;padding: 0;}
			body {
				background: url(img/1.jpg) no-repeat;
			}
		
			#picture {
				height: 160px;
				text-align: center;
				background: rgba(255,255,255,0.3);
			}
			
			#picture ul{
				width: 1000px;
				margin: 0px auto;
				list-style: none;	
			}
			ul li img{			
				float: left;
				width: 160px;
				height:100px;
				margin-right: 30px;	
				padding-top: 30px;			
			}
		</style>
	</head>
	<body>
		<div id="picture">
			<ul>
				<li><a name="img/1.jpg"><img src="img/1.jpg"/></a></li>
				<li><a name="img/2.jpg"><img src="img/2.jpg"/></a></li>
				<li><a name="img/3.jpg"><img src="img/3.jpg"/></a></li>
				<li><a name="img/4.jpg"><img src="img/4.jpg"/></a></li>
				<li><a name="img/5.jpg"><img src="img/5.jpg"/></a></li>
			</ul>
		</div>
		<script>
			var body=document.body;
			var aArray=document.getElementsByTagName("a");
			for(var i=0;i<aArray.length;i++)
			{
				aArray[i].onclick=function(){
					body.style.backgroundImage="url("+this.name+")";
				}
			}
		</script>
	</body>
</html>
